package com.spring.common.entity;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class RemindTaskBean implements Serializable {
    private static final long serialVersionUID = 777197918651078049L;
    @NotNull(message = "调度任务名称不能为空")
    private String taskName;
    @Pattern(regexp = "\\d/\\d+ \\*{1} \\*{1} \\*{1} \\*{1} \\?{1}",message = "表达式格式错误,请更正")
    private String cron;
    @NotNull(message = "任务状态不能为空")
    @Range(min = 0,max = 1,message = "任务状态错误,请更正")
    private Integer taskStatus;
}
